﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AFT
{
    class ProcessInformation
    {

        public struct ProcInfo
        {
            public string user { get; set; }
            public string pid { get; set; }
            public string ppid { get; set; }
            public string vsize { get; set; }
            public string rss { get; set; }
            public string prio { get; set; }
            public string nice { get; set; }
            public string rtpri { get; set; }
            public string sched { get; set; }
            public string wchan { get; set; }
            public string pc { get; set; }
            public string name { get; set; }
        }

        public List<ProcInfo> processInformation;

        public ProcessInformation()
        {
            processInformation = new List<ProcInfo>();
        }

        public void addProcess(    string user,
                                string pid,
                                string ppid,
                                string vsize,
                                string rss,
                                string prio,
                                string nice,
                                string rtpri,
                                string sched,
                                string wchan,
                                string pc,
                                string name     )
        {

            ProcInfo newProc = new ProcInfo();
            
            newProc.user = user;
            newProc.pid = pid;
            newProc.ppid = ppid;
            newProc.vsize = vsize;
            newProc.rss = rss;
            newProc.prio = prio;
            newProc.nice = nice;
            newProc.rtpri = rtpri;
            newProc.sched = sched;
            newProc.wchan = wchan;
            newProc.pc = pc;
            newProc.name = name;

            processInformation.Add(newProc);

        }

        public int getNumberOfDiskInfo()
        {
            return processInformation.Count;
        }
    }
}

